﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using System.Net;
using PWA.PineWebService;

namespace PWA
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Service1 s1 = new Service1();
            Lead leadObj = s1.GetLead();
            Label1.Text = leadObj.LeadName;
        }

        protected void btnEmail_Click(object sender, EventArgs e)
        {

            NetworkCredential creds = new NetworkCredential("grindprojectist421@gmail.com", "grindproject");
            SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
            smtp.EnableSsl = true;
            smtp.UseDefaultCredentials = false;
            smtp.Credentials = creds;
            smtp.Send("ryan@test.com", "2154352966@messaging.sprintpcs.com", "clicked a button", "this is an sms message");
        }
    }
}
